package com.weike.lib;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class MyClass {
   static NetPrinter netPrinter;
    public static void main(String args[]) {
        xxx();
        System.out.println("hello world   +++++++++++++111");
    }
    public static void xxx() {
         netPrinter = new NetPrinter();
        boolean open = netPrinter.Open("192.168.1.88", 9100);
        netPrinter.Set();
        System.out.println("hello world   +++++++++++++111"+open);
        System.out.println("hello world   +++++++++++++111  netPrinter:"+netPrinter.IFOpen);
        /// <summary>
        /// 打印条码
        /// </summary>
        /// <param name="numstr"></param>
        /// <param name="height"></param>
        /// <param name="width"></param>
        /// <param name="numweizi">1:上方  2:下方  0:不打印数字</param>
        /// <param name="fontalign">0:居左 1:居中 2:居右</param>
        /// <param name="fontsize">字体大小0:正常大小 1:两倍高 2:两倍宽 3:两倍大小 4:三倍高 5:三倍宽 6:三倍大小 7:四倍高 8:四倍宽 9:四倍大小 10:五倍高 11:五倍宽 12:五倍大小</param>
//        public void PrintTiaoMa(String numstr, int height, int width, int numweizi, int fontalign, int fontsize)
//        netPrinter.PrintTiaoMa("1111112222",20,20,2,1,0);
        netPrinter.PrintText("测试测试测试",1,1,0);
        netPrinter.Close();
    }

    public static void xxx2(){
        netPrinter.Close();
    }
    // 粗略计算打印纸上每个字段占的长度
    private int wlname = 18;
    private int wlnum = 6;
    private int wlunit = 7;
    private int wlprice = 9;


}